package com.tyylab.kestrel.framework.spring.rpc.feign.annotation;

import com.tyylab.kestrel.framework.spring.rpc.feign.config.FeignHeaderConfig;
import com.tyylab.kestrel.framework.spring.rpc.feign.config.KestrelFeignClientRegistrar;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

@Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE, })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Repeatable(EnableKestrelFeignClient.List.class)
@Import({KestrelFeignClientRegistrar.class, FeignHeaderConfig.class})
public @interface EnableKestrelFeignClient {
    String serviceName() default "";
    String[] apiBasePackages() default {};

    @Import({KestrelFeignClientRegistrar.class, FeignHeaderConfig.class})
//    @Import(KestrelFeignClientAutoconfig.class)
    @Target({ElementType.TYPE,ElementType.ANNOTATION_TYPE,})
    @Retention(RetentionPolicy.RUNTIME)
    @Documented
    public @interface List {
        EnableKestrelFeignClient[] value();
    }
}
